package com.woniuxy.woniuticket.ordermodule.service.serviceimpl;

import com.woniuxy.woniuticket.financemodule.dao.CinemaAccountDAO;
import com.woniuxy.woniuticket.ordermodule.dao.CinemaStreamDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.math.BigDecimal;

/**
 * @author zyf
 * @Description:TODO
 * @date 2019/6/17
 * @Version 1.0
 */
@Service
public class ViPOrder {
    @Resource
    private CinemaStreamDAO cinemaStreamDAO;
    @Resource
    private CinemaAccountDAO cinemaAccountDAO;

    public void vipOrder(BigDecimal orderPrice,Integer income){
        //流水表插入数据
        cinemaStreamDAO.insert(orderPrice,income);
        //账号进账
        cinemaAccountDAO.increaseMoney(orderPrice);
    }
}
